Optimal. Leaf size=85 \[ \frac {(A b-3 a B) \tan ^{-1}\left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{\sqrt {a} b^{5/2}}-\frac {\sqrt {x} (A b-3 a B)}{a b^2}+\frac {x^{3/2} (A b-a B)}{a b (a+b x)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {27, 78, 50, 63, 205} \[ -\frac {\sqrt {x} (A b-3 a B)}{a b^2}+\frac {(A b-3 a B) \tan ^{-1}\left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{\sqrt {a} b^{5/2}}+\frac {x^{3/2} (A b-a B)}{a b (a+b x)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 50
Rule 63
Rule 78
Rule 205
Rubi steps
\begin {align*} \int \frac {\sqrt {x} (A+B x)}{a^2+2 a b x+b^2 x^2} \, dx &=\int \frac {\sqrt {x} (A+B x)}{(a+b x)^2} \, dx\\ &=\frac {(A b-a B) x^{3/2}}{a b (a+b x)}-\frac {\left (\frac {A b}{2}-\frac {3 a B}{2}\right ) \int \frac {\sqrt {x}}{a+b x} \, dx}{a b}\\ &=-\frac {(A b-3 a B) \sqrt {x}}{a b^2}+\frac {(A b-a B) x^{3/2}}{a b (a+b x)}+\frac {(A b-3 a B) \int \frac {1}{\sqrt {x} (a+b x)} \, dx}{2 b^2}\\ &=-\frac {(A b-3 a B) \sqrt {x}}{a b^2}+\frac {(A b-a B) x^{3/2}}{a b (a+b x)}+\frac {(A b-3 a B) \operatorname {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\sqrt {x}\right )}{b^2}\\ &=-\frac {(A b-3 a B) \sqrt {x}}{a b^2}+\frac {(A b-a B) x^{3/2}}{a b (a+b x)}+\frac {(A b-3 a B) \tan ^{-1}\left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{\sqrt {a} b^{5/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 67, normalized size = 0.79 \[ \frac {(A b-3 a B) \tan ^{-1}\left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{\sqrt {a} b^{5/2}}+\frac {\sqrt {x} (3 a B-A b+2 b B x)}{b^2 (a+b x)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.96, size = 198, normalized size = 2.33 \[ \left [\frac {{\left (3 \, B a^{2} - A a b + {\left (3 \, B a b - A b^{2}\right )} x\right )} \sqrt {-a b} \log \left (\frac {b x - a - 2 \, \sqrt {-a b} \sqrt {x}}{b x + a}\right ) + 2 \, {\left (2 \, B a b^{2} x + 3 \, B a^{2} b - A a b^{2}\right )} \sqrt {x}}{2 \, {\left (a b^{4} x + a^{2} b^{3}\right )}}, \frac {{\left (3 \, B a^{2} - A a b + {\left (3 \, B a b - A b^{2}\right )} x\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b}}{b \sqrt {x}}\right ) + {\left (2 \, B a b^{2} x + 3 \, B a^{2} b - A a b^{2}\right )} \sqrt {x}}{a b^{4} x + a^{2} b^{3}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 65, normalized size = 0.76 \[ \frac {2 \, B \sqrt {x}}{b^{2}} - \frac {{\left (3 \, B a - A b\right )} \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )}{\sqrt {a b} b^{2}} + \frac {B a \sqrt {x} - A b \sqrt {x}}{{\left (b x + a\right )} b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.08, size = 87, normalized size = 1.02 \[ \frac {A \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )}{\sqrt {a b}\, b}-\frac {3 B a \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )}{\sqrt {a b}\, b^{2}}-\frac {A \sqrt {x}}{\left (b x +a \right ) b}+\frac {B a \sqrt {x}}{\left (b x +a \right ) b^{2}}+\frac {2 B \sqrt {x}}{b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.33, size = 65, normalized size = 0.76 \[ \frac {{\left (B a - A b\right )} \sqrt {x}}{b^{3} x + a b^{2}} + \frac {2 \, B \sqrt {x}}{b^{2}} - \frac {{\left (3 \, B a - A b\right )} \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )}{\sqrt {a b} b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.09, size = 62, normalized size = 0.73 \[ \frac {2\,B\,\sqrt {x}}{b^2}-\frac {\sqrt {x}\,\left (A\,b-B\,a\right )}{x\,b^3+a\,b^2}+\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,\sqrt {x}}{\sqrt {a}}\right )\,\left (A\,b-3\,B\,a\right )}{\sqrt {a}\,b^{5/2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 10.57, size = 782, normalized size = 9.20 \[ \begin {cases} \tilde {\infty } \left (- \frac {2 A}{\sqrt {x}} + 2 B \sqrt {x}\right ) & \text {for}\: a = 0 \wedge b = 0 \\\frac {\frac {2 A x^{\frac {3}{2}}}{3} + \frac {2 B x^{\frac {5}{2}}}{5}}{a^{2}} & \text {for}\: b = 0 \\\frac {- \frac {2 A}{\sqrt {x}} + 2 B \sqrt {x}}{b^{2}} & \text {for}\: a = 0 \\- \frac {2 i A \sqrt {a} b^{2} \sqrt {x} \sqrt {\frac {1}{b}}}{2 i a^{\frac {3}{2}} b^{3} \sqrt {\frac {1}{b}} + 2 i \sqrt {a} b^{4} x \sqrt {\frac {1}{b}}} + \frac {A a b \log {\left (- i \sqrt {a} \sqrt {\frac {1}{b}} + \sqrt {x} \right )}}{2 i a^{\frac {3}{2}} b^{3} \sqrt {\frac {1}{b}} + 2 i \sqrt {a} b^{4} x \sqrt {\frac {1}{b}}} - \frac {A a b \log {\left (i \sqrt {a} \sqrt {\frac {1}{b}} + \sqrt {x} \right )}}{2 i a^{\frac {3}{2}} b^{3} \sqrt {\frac {1}{b}} + 2 i \sqrt {a} b^{4} x \sqrt {\frac {1}{b}}} + \frac {A b^{2} x \log {\left (- i \sqrt {a} \sqrt {\frac {1}{b}} + \sqrt {x} \right )}}{2 i a^{\frac {3}{2}} b^{3} \sqrt {\frac {1}{b}} + 2 i \sqrt {a} b^{4} x \sqrt {\frac {1}{b}}} - \frac {A b^{2} x \log {\left (i \sqrt {a} \sqrt {\frac {1}{b}} + \sqrt {x} \right )}}{2 i a^{\frac {3}{2}} b^{3} \sqrt {\frac {1}{b}} + 2 i \sqrt {a} b^{4} x \sqrt {\frac {1}{b}}} + \frac {6 i B a^{\frac {3}{2}} b \sqrt {x} \sqrt {\frac {1}{b}}}{2 i a^{\frac {3}{2}} b^{3} \sqrt {\frac {1}{b}} + 2 i \sqrt {a} b^{4} x \sqrt {\frac {1}{b}}} + \frac {4 i B \sqrt {a} b^{2} x^{\frac {3}{2}} \sqrt {\frac {1}{b}}}{2 i a^{\frac {3}{2}} b^{3} \sqrt {\frac {1}{b}} + 2 i \sqrt {a} b^{4} x \sqrt {\frac {1}{b}}} - \frac {3 B a^{2} \log {\left (- i \sqrt {a} \sqrt {\frac {1}{b}} + \sqrt {x} \right )}}{2 i a^{\frac {3}{2}} b^{3} \sqrt {\frac {1}{b}} + 2 i \sqrt {a} b^{4} x \sqrt {\frac {1}{b}}} + \frac {3 B a^{2} \log {\left (i \sqrt {a} \sqrt {\frac {1}{b}} + \sqrt {x} \right )}}{2 i a^{\frac {3}{2}} b^{3} \sqrt {\frac {1}{b}} + 2 i \sqrt {a} b^{4} x \sqrt {\frac {1}{b}}} - \frac {3 B a b x \log {\left (- i \sqrt {a} \sqrt {\frac {1}{b}} + \sqrt {x} \right )}}{2 i a^{\frac {3}{2}} b^{3} \sqrt {\frac {1}{b}} + 2 i \sqrt {a} b^{4} x \sqrt {\frac {1}{b}}} + \frac {3 B a b x \log {\left (i \sqrt {a} \sqrt {\frac {1}{b}} + \sqrt {x} \right )}}{2 i a^{\frac {3}{2}} b^{3} \sqrt {\frac {1}{b}} + 2 i \sqrt {a} b^{4} x \sqrt {\frac {1}{b}}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________